#!/usr/bin/perl -w

# inc_epstat
# File ID: afd0e776-5d3d-11df-9265-90e6ba3022ac
# Filter for å gjøre epstat-format brukbart i gnuplot.
# -f skriver telleren foran istedenfor etter.

use Getopt::Std;

our $opt_f = 0;
my $Count = 0;

getopts('f');

if ($opt_f) { # For å få opp farta
	while (<>) {
		s/^(.+)/$Count\t$1/;
		print;
		$Count++;
	}
} else {
	while (<>) {
		s/^(.+)/$1\t$Count/;
		print;
		$Count++;
	}
}
